//
//  PPMeTextCellFrame.m
//  PropertyManage
//
//  Created by Dreamsoul on 15-3-24.
//  Copyright (c) 2015年 com.lab603.mc. All rights reserved.
//

#import "PPMeTextCellFrame.h"
#import "PPMe.h"
#define  cellpadding 5
@implementation PPMeTextCellFrame
- (void)setMe:(PPMe *)me{
    _me = me;
    //背景图片
    CGFloat backgroundViewX = 0;
    CGFloat backgroundViewY = 0;
    CGFloat backgroundViewW = [UIScreen mainScreen].bounds.size.width;
    //根据内容计算得高度
    CGFloat backgroundViewH = 0;
    //类别Label
    CGSize  typeSize = [me.typeString sizeWithFont:[UIFont systemFontOfSize:16]];
    CGFloat typeX = backgroundViewW/2-typeSize.width/2;
    CGFloat typeY = 20-typeSize.height/2;
    _typeF = (CGRect){{typeX,typeY},typeSize};
    
    //计算得高度以及cell的高度
    backgroundViewH = 40;
    _backgroundViewF = CGRectMake(backgroundViewX, backgroundViewY, backgroundViewW, backgroundViewH);
    //cellHeight
    _cellheight = backgroundViewH;
    

}
@end
